home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 040a / qmrwmail.zip / RUNWAY.SCR < prev   
Text File  |  1993-02-11  |  6KB  |  188 lines

  1. ;  Credit for this script goes to Phil Gordemer of Compu-Data  (609) 232-1245.
  2. ;  Over the years I have updated portions of it to keep inline with new
  3. ;  software that has been added to the boards I call.   Enjoy!  - Ray Novino -
  4. ;
  5. ;  Qmail 4.0 Script for Mail Passing to RunWay BBS (215) 623-6203
  6. ;  Features of this script:
  7. ;
  8. ;  1. Will dial phone for a limited of times and giveup.
  9. ;  2. Assumes any stop of 5 minutes is a lockup and disconnects
  10. ;     the phone.
  11. ;  3. Confirms messages were actually inserted and resends if needed.
  12. ;  4. Creates a capture file of entire session and dialing attempts.
  13. ;  5. If carrier is dropped, does NOT attempt to redial so as
  14. ;     not to get involved in a loop of calling, dropping carrier
  15. ;     and recalling for hours on end...
  16. ;  6. Will delete the .REP file after a successful upload.
  17. ;  7. Can handle pre-packed mail from the host
  18. ;  8. Resets modem and takes it off hook before returning to DOS to allow
  19. ;     batch files to continue without callers getting a busy signal.
  20. ;
  21. ; This script assumes that you have EXTENTED PROMPT turned on in QMAIL
  22. ; 4.0 and you do NOT have the logoff before message insertion option on.
  23. ; If at anytime carrier is dropped the script will just finish.  In
  24. ; other scripts, we have had the script redial and try again only to be
  25. ; caught in an endless loop of redialing and getting dropped.  Since a
  26. ; Capture file is created, you can review that and if you see a problem
  27. ; can manually dial in.
  28. ;
  29. ; This script can easily be run from a DOS batch.  An example batch file
  30. ; might look like this;
  31. ;
  32. ;@Echo Off
  33. ;:Do something here...
  34. ;C:
  35. ;CD\QMODEM
  36. ;Qmodem /S=RunWay.SCR
  37. ;:Continue on...
  38. ;
  39. ;                           IMPORTANT!!!!!
  40. ;  Make sure you update the variables in the definitions section below
  41. ;  which are defined between the lines marked with "########"
  42. ;  ------------------------------------------------------------------------
  43.  
  44.  
  45. ; ---------------------------  DEFINITIONS  -------------------------
  46. TurnOn   8_BIT
  47. TurnOff  LINEFEED
  48. TurnOff  XON/XOFF
  49. TurnOff  NOISE
  50. TurnOff  MUSIC
  51. TurnOn   SCROLL
  52. TurnOff  PRINT
  53. TurnOff  ECHO
  54. String   QWKFILE REPFILE QWKPATH REPPATH TELNUM LIMIT
  55. String   INITIAL DOOR XFER NAME HOSTNAME LANGUAGE
  56.  
  57. ; #####################################################################
  58. Assign   HOSTNAME  "RunWay BBS"             ; name of host system
  59. Assign   QWKFILE   RUNWAY.QWK               ; name of QWK file
  60. Assign   REPFILE   RUNWAY.REP               ; name of REP file
  61. Assign   QWKPATH   H:\QWKS\                 ; DRIVE:\PATH of QWK file
  62. Assign   REPPATH   H:\REPS\                 ; DRIVE:\PATH of REP file
  63. Assign   DOOR      2                        ; Qmail 4.0 Door #
  64. Assign   XFER      G                        ; Transfer Protocol
  65. Assign   NAME      "First Last PASSWORD"    ; My name & password
  66. Assign   TELNUM    "ATDT 623-4897^M"        ; dial string
  67. ;Assign   TELNUM    "ATDT 1 215 623-6103^M"  ; dial string
  68. Assign   LIMIT     10                       ; # of times to dial
  69. Assign   INITIAL   "AT^M"                   ; Modem init string
  70. Assign   LANGUAGE  "2"                      ; Language to use
  71. SetComm  19200 8 NONE 1                     ; Communications Parameters
  72. Capture  RUNWAY.CAP                         ; Name of capture file
  73. ; ######################################################################
  74.  
  75. ;---------------------------- Initialize the modem ----------------------
  76. INIT:
  77. Assign   0 $LIMIT
  78. ClrScr
  79. Display  "Initializing modem .. "
  80. Delay    1000
  81. Send     "$INITIAL"
  82. Waitfor  "OK"
  83.  
  84.  
  85. ;----------------------------- Dial the Board ---------------------------
  86. GETON:
  87. When
  88. When     "BUSY"         AGAIN
  89. When     "NO DIAL TONE" AGAIN
  90. When     "NO CARRIER"   AGAIN
  91. When     "VOICE"        GETOUT
  92. Pause    2000
  93. Decr     0
  94. If       "$0" < "1" GETOUT
  95. Timeout  45 GETON
  96. clrscr
  97. displayln "Attempting to connect with $HOSTNAME"
  98. displayln "Dial attempts left are $0"
  99. displayln "Dialing String: $TELNUM"
  100. delay    100
  101. Send     "$TELNUM"
  102. Waitfor  "CONNECT"
  103. goto     ONTHESYSTEM
  104.  
  105. AGAIN:
  106. pause    1000
  107. Send     "ATH1^M"
  108. Pause    9000
  109. goto     GETON
  110.  
  111.  
  112. ;-------------------- We have connected to the system ---------------------
  113. ONTHESYSTEM:
  114. When
  115. When     "Press (Enter) to continue?"       "^M"
  116. When     "graphics (Enter)=no?"             "N Q^M"
  117. When     "(Enter)=yes?"                     "N^M"
  118. When     "What is your first name?"         "$NAME^M"
  119. When     "messages since"                   "N^M"
  120. When     "Conference members (Enter)=no?"   "N^M"
  121. When     "More (Y), (N), (NS)"              "N^M"
  122. When     "Enter Language"                   "$LANGUAGE^M"
  123. When     "(H)elp, More?"                    "N^M"
  124. When     "NO CARRIER"                       GETOUT 
  125. timeout  600 GETOUT
  126. Waitfor  "Command?"
  127. Delay    100
  128. Send     "QMAIL4 D Y^M"
  129. Delay    100
  130.  
  131.  
  132. ;------------------------ Call for the download of the packet ----------------
  133. DOWNSECTION:
  134. Send     "D^M"
  135. When
  136. When     "NO CARRIER"            GETOUT
  137. When     "<NO TRANSFER>"         UPSECTION
  138. When     "<OFFLINE>"             DOOFFLINE
  139. When     "<PRESCAN>"             DOOFFLINE
  140. When     "these messages (Y/N)?" "Y^M"
  141. Delay    100
  142.  
  143. DOOFFLINE:
  144. Waitfor  "<DOWNLOAD>"
  145. Delay    100
  146. Download $XFER $QWKPATH$QWKFILE
  147. If       $SUCCESS  UPSECTION
  148. Goto     DOWNSECTION
  149.  
  150.  
  151. ;-------------------------- Lets upload the replies ---------------------
  152. UPSECTION:
  153. Send     "^M"
  154. Waitfor  "<COMMAND>"
  155. Delay    100
  156. When
  157. When     "NO CARRIER"   GETOUT
  158. Exist    $REPPATH$REPFILE  SENDEM
  159. Goto     ALLDONE
  160.              
  161. SENDEM:
  162. Send     "U^M"
  163. Delay    100
  164. Waitfor  "<UPLOAD>"
  165. Pause    1000
  166. Upload   $XFER $REPPATH$REPFILE
  167. If       $FAIL  UPSECTION
  168. When
  169. When     "<MESSAGES NOT INSERTED>"  UPSECTION
  170. Dos      "Del $REPPATH$REPFILE"   
  171.  
  172. ;--------------------------- Lets get out of here ----------------------
  173. ALLDONE:
  174. When
  175. When     "<MESSAGES INSERTED>"  "^M"
  176. When     "Qmail Command?" "G^M"
  177. When     "<HANGUP>"    GETOUT
  178. Waitfor  "<COMMAND>"
  179. Pause    1000
  180. Send     "G^M"
  181. Pause    5000
  182.  
  183. GETOUT:
  184. Hangup
  185. Send     "ATZ^M^~^~^~^~^~^~ATH1M0^M"
  186. System   Y
  187. Exit
  188.